package untils

import "servers/pkg"

// 阿里云
type Sms interface {
	AliYun(mobile string, code string) error
}
type AliSms struct {
}

func (as *AliSms) AliYun(mobile string, code string) error {
	sms, err := pkg.SendSms(mobile, code)
	if err != nil {
		return err
	}
	if *sms.Body.Code != "OK" {
		return err
	}
	return nil
}

// 互亿无线 SMS
type HuYi interface {
	HuYiYun(mobile string, code string) error
}
type HuyiSms struct {
}
